<script setup>
import HeaderNav from './views/HeaderNav.vue';
import AdminNav from './views/adminViews/AdminNav.vue';
</script>



<template>
  <el-container v-if="$store.state.isLogin && $store.state.user.isAdmin && $store.state.onAdmin">
    <el-header><header-nav /></el-header>
    <el-main style="padding: 0;">
      <el-watermark :content="'admin: ' + $store.state.user.uid + ' - ' + $store.state.user.username" font="20" z-index="10" rotate="-50">
        <el-container>
          <el-aside width="210px"><admin-nav /></el-aside>
          <el-main style="padding: 20px;"><router-view /></el-main>
        </el-container>
      </el-watermark>
    </el-main>
  </el-container>

  <el-container v-else>
    <el-header><header-nav /></el-header>
    <el-main><router-view /></el-main>
  </el-container>
</template>


